<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>弹出框</title>
</head>
<body>
<script>
    var flag = confirm("吃过了吗？")
    if (flag){
        alert("吃过了！")
    }
</script>
</body>
</html>